package com.bear.newsset.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.bear.newsset.dao.entity.AccountEntity;
import com.bear.newsset.dao.entity.ImageSqlEntity;
import com.bear.newsset.dao.entity.NewsDataSqlEntity;
import com.bear.newsset.dao.entity.NewsLikeSqlEntity;
import com.bear.newsset.dao.entity.NewsStatusSqlEntity;
import com.bear.newsset.dao.entity.QueryNewsDataEntity;
import com.bear.newsset.dao.entity.StringMapSqlEntity;

import com.bear.newsset.dao.AccountEntityDao;
import com.bear.newsset.dao.ImageSqlEntityDao;
import com.bear.newsset.dao.NewsDataSqlEntityDao;
import com.bear.newsset.dao.NewsLikeSqlEntityDao;
import com.bear.newsset.dao.NewsStatusSqlEntityDao;
import com.bear.newsset.dao.QueryNewsDataEntityDao;
import com.bear.newsset.dao.StringMapSqlEntityDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig accountEntityDaoConfig;
    private final DaoConfig imageSqlEntityDaoConfig;
    private final DaoConfig newsDataSqlEntityDaoConfig;
    private final DaoConfig newsLikeSqlEntityDaoConfig;
    private final DaoConfig newsStatusSqlEntityDaoConfig;
    private final DaoConfig queryNewsDataEntityDaoConfig;
    private final DaoConfig stringMapSqlEntityDaoConfig;

    private final AccountEntityDao accountEntityDao;
    private final ImageSqlEntityDao imageSqlEntityDao;
    private final NewsDataSqlEntityDao newsDataSqlEntityDao;
    private final NewsLikeSqlEntityDao newsLikeSqlEntityDao;
    private final NewsStatusSqlEntityDao newsStatusSqlEntityDao;
    private final QueryNewsDataEntityDao queryNewsDataEntityDao;
    private final StringMapSqlEntityDao stringMapSqlEntityDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        accountEntityDaoConfig = daoConfigMap.get(AccountEntityDao.class).clone();
        accountEntityDaoConfig.initIdentityScope(type);

        imageSqlEntityDaoConfig = daoConfigMap.get(ImageSqlEntityDao.class).clone();
        imageSqlEntityDaoConfig.initIdentityScope(type);

        newsDataSqlEntityDaoConfig = daoConfigMap.get(NewsDataSqlEntityDao.class).clone();
        newsDataSqlEntityDaoConfig.initIdentityScope(type);

        newsLikeSqlEntityDaoConfig = daoConfigMap.get(NewsLikeSqlEntityDao.class).clone();
        newsLikeSqlEntityDaoConfig.initIdentityScope(type);

        newsStatusSqlEntityDaoConfig = daoConfigMap.get(NewsStatusSqlEntityDao.class).clone();
        newsStatusSqlEntityDaoConfig.initIdentityScope(type);

        queryNewsDataEntityDaoConfig = daoConfigMap.get(QueryNewsDataEntityDao.class).clone();
        queryNewsDataEntityDaoConfig.initIdentityScope(type);

        stringMapSqlEntityDaoConfig = daoConfigMap.get(StringMapSqlEntityDao.class).clone();
        stringMapSqlEntityDaoConfig.initIdentityScope(type);

        accountEntityDao = new AccountEntityDao(accountEntityDaoConfig, this);
        imageSqlEntityDao = new ImageSqlEntityDao(imageSqlEntityDaoConfig, this);
        newsDataSqlEntityDao = new NewsDataSqlEntityDao(newsDataSqlEntityDaoConfig, this);
        newsLikeSqlEntityDao = new NewsLikeSqlEntityDao(newsLikeSqlEntityDaoConfig, this);
        newsStatusSqlEntityDao = new NewsStatusSqlEntityDao(newsStatusSqlEntityDaoConfig, this);
        queryNewsDataEntityDao = new QueryNewsDataEntityDao(queryNewsDataEntityDaoConfig, this);
        stringMapSqlEntityDao = new StringMapSqlEntityDao(stringMapSqlEntityDaoConfig, this);

        registerDao(AccountEntity.class, accountEntityDao);
        registerDao(ImageSqlEntity.class, imageSqlEntityDao);
        registerDao(NewsDataSqlEntity.class, newsDataSqlEntityDao);
        registerDao(NewsLikeSqlEntity.class, newsLikeSqlEntityDao);
        registerDao(NewsStatusSqlEntity.class, newsStatusSqlEntityDao);
        registerDao(QueryNewsDataEntity.class, queryNewsDataEntityDao);
        registerDao(StringMapSqlEntity.class, stringMapSqlEntityDao);
    }
    
    public void clear() {
        accountEntityDaoConfig.clearIdentityScope();
        imageSqlEntityDaoConfig.clearIdentityScope();
        newsDataSqlEntityDaoConfig.clearIdentityScope();
        newsLikeSqlEntityDaoConfig.clearIdentityScope();
        newsStatusSqlEntityDaoConfig.clearIdentityScope();
        queryNewsDataEntityDaoConfig.clearIdentityScope();
        stringMapSqlEntityDaoConfig.clearIdentityScope();
    }

    public AccountEntityDao getAccountEntityDao() {
        return accountEntityDao;
    }

    public ImageSqlEntityDao getImageSqlEntityDao() {
        return imageSqlEntityDao;
    }

    public NewsDataSqlEntityDao getNewsDataSqlEntityDao() {
        return newsDataSqlEntityDao;
    }

    public NewsLikeSqlEntityDao getNewsLikeSqlEntityDao() {
        return newsLikeSqlEntityDao;
    }

    public NewsStatusSqlEntityDao getNewsStatusSqlEntityDao() {
        return newsStatusSqlEntityDao;
    }

    public QueryNewsDataEntityDao getQueryNewsDataEntityDao() {
        return queryNewsDataEntityDao;
    }

    public StringMapSqlEntityDao getStringMapSqlEntityDao() {
        return stringMapSqlEntityDao;
    }

}
